<template>
    <!-- 发展历程 -->
    <div class="history-box">
      <CardBox title="建设历程"></CardBox>
        <div class="content-container history-container">
            <div class="history-row history-top-row">
                <div class="history-item clearfix" v-for="item in historyItems" :key="item.title">
                    <div class="history-item-line pull-left">
                        <div class="border-small-circle"></div>
                        <div class="border-line"></div>
                        <div class="border-big-circle"></div>
                    </div>
                    <div class="pull-left history-item-content">
                        <div class="history-time">{{item.time}}</div>
                        <div class="history-title fs-14">{{item.title}}</div>
                        <div class="history-desciption">{{item.description}}</div>
                    </div>
                </div>
            </div>
            <div class="history-row history-middle-row">
                <div class="history-item bbnone"></div>
                <div class="history-item bbnone"></div>
                <div class="history-item bbnone"></div>
            </div>
            <div class="history-row history-bottom-row">
                <div class="history-item clearfix" v-for="(item, index) in historyItems1" :key="item.title">
                    <div class="history-item-line pull-left">
                        <div class="border-small-circle" v-if="index != 0"></div>
                        <div class="border-line" v-if="index != 0"></div>
                        <div class="border-big-circle" v-if="index != 0"></div>
                        <div class="border-line border-45degree" v-if="index == 0"></div>
                    </div>
                    <div class="pull-left history-item-content">
                        <div class="history-time">{{item.time}}</div>
                        <div class="history-title fs-14">{{item.title}}</div>
                        <div class="history-desciption">{{item.description}}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import CardBox from '@/components/Global/CardBox.vue'
export default {
    name: 'History',
    components: {
        CardBox
    },
    data() {
        return {
            historyItems: [
                {
                    time: '2022.11-2023.3',
                    title: '规划选址',
                    description: '选定上海植物园为超大城市高强度人为干扰观测核心区，并纳入市级生态环境智慧监测体系'
                },
                {
                    time: '2023.4-2024.8',
                    title: '方案设计与论证',
                    description: '经现场踏勘、部门协同及专家咨询，编制建设方案，2024年8月建设方案通过专家论证'
                },
                {
                    time: '2024.9-2024.10',
                    title: '设备安装',
                    description: '完成红外相机、声纹设备安装调试'
                },
            ],
            historyItems1: [
                {
                    time: '2024.11-2025.9',
                    title: '系统集成与平台构建',
                    description: '集成多维度协同观测数据，建设"监测-研究-科普-示范"一体化平台'
                },
                {
                    time: '2025.4-2025.5',
                    title: '固定样地',
                    description: '划定20个固定生物样地'
                },
                {
                    time: '2024.11-2025.3',
                    title: '设备安装',
                    description: '部署昆虫智能监测设备、小型气象站及空气质量站'
                }
            ]
        }
        }
    }
</script>
<style lang="scss" scoped>
.history-container{
  padding: 21px 14px;
  height: 290px;
}
.history-row{
    display: flex;
  .history-item{
    flex: 1;
    height: 131px;
    border-bottom: 3px solid #4689C2;
    .last-compare-period{
      position: absolute;
      right: 0px;
    }
  }
  .history-item-line {
    position: relative;


    .border-small-circle, .border-big-circle {
      position: absolute;
      border-radius: 50%;
   
      z-index: 2;
    }
    .border-small-circle{
      top:-4px;
      left: -4px;
      width: 8px;
      height: 8px;
      background: #fff;
    }
    .border-big-circle{
      top:127px;
      left: -5px;
      width: 10px;
      height: 10px;
      background: #4689C2;
    }
    .border-line {
      position: absolute;
      width: 1px;
      height: 131px;
      background: #146095;
      z-index: 1;
      top:0px;
      left: 0px;
    }
    .border-45degree{
      transform: rotate(45deg);
      height: 12px;
      background: #4689C2;
      top:121px;
      left: 4px;
      width: 3px;
    }
    .last-line{
      height: 40px;
      top: 40px;
    }
    .last-small-circle{
      top: 40px;
      position: absolute;
    }
  }
  .history-item-content{
    position: relative;
    padding-left: 6px;
    padding-right: 6px;
    color: #fff;
    height: 131px;
    .history-time{
      font-size: 16px;
      font-weight: bold;
      font-family: 'DIN Pro';
      position: absolute;
      top: -10px;
    }
    .history-title{
      font-size: 14px;
      margin-top: 18px;
      margin-bottom: 9px;
    }
    .history-desciption{
      font-size: 12px;
      color:#ccc;
    }
    .last-time{
      top: 30px;
    }
    .last-title{
      margin-top: 52px;
    }
  }
}
.history-row:nth-child(1){
  .history-item:nth-child(3){
    flex: 1;
    width: 100px;
    border-bottom:none;
  }
}
.history-row:nth-child(3){
  position: relative;
  top: -3px;
  .history-item:nth-child(3){
    flex: 1;
    width: 100px;
  }
}
.history-row:nth-child(2){
  height: 30px;
  overflow: hidden;
  position: relative;
  top: -3px;
  .history-item:last-child{
    flex: 1;
    width: 100px;
    border-right: 3px solid #4689C2;
    border-top: 3px solid #4689C2;
    border-top-right-radius:20px;
  }
}

.history-bottom-row{
  .history-item:last-child{
    border-right: 3px solid #4689C2;
  }
  .last-row-time{
    top: 50px!important;
  }
  .develp-period{
    margin-left: 10px;
  }
}
</style>
